<link rel="stylesheet" type="text/css" href="__ADMIN__/lib/extend/city-picker/city-picker.css" media="all">
<script type="text/javascript" src="__ADMIN__/lib/extend/city-picker/city-picker.data.js"></script>
<input id="city-picker" {if $is_require eq 1}lay-verify="required"{/if} placeholder="请选择{$show_tips}" autocomplete="off" class="layui-input" type="text">
<script type="text/javascript">
	layui.config({
		base: '__ADMIN__'
	}).extend({
	    citypicker: '/lib/extend/city-picker/city-picker' // {/}的意思即代表采用自有路径，即不跟随 base 路径
	}).use(['citypicker'], function () {
	    var cityPicker = layui.citypicker;
	    
	    //初始化组件参数
	    var options = {
	            simple: false,
	            responsive: false,
	            placeholder: '请选择{$show_tips}',
	            level: "{$level}",// 级别
	            provincename: '',//input hidden 的值
	            cityname: '',//input hidden 的值
	            districtname: '',//input hidden 的值
	            province: '{$item[0]}',// 默认省份名称
	            city: '{$item[1]}',// 默认地市名称
	            district: '{$item[2]}'// 默认区县名称
	        };
	    var cityPicker = new cityPicker("#city-picker",options);
	    console.log(cityPicker);
	});
</script>